const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  lintOnSave: false,
  // 配置跨域代理
  devServer: {
    proxy: {
      '/api': {
        // target: 'http://115.29.242.190:3000',  // 目标接口的基础路径
        target: 'http://127.0.0.1:3000',  // 目标接口的基础路径
        changeOrigin: true,  // 开启跨域
        pathRewrite: {
          '^/api': '/api'
        }
      }
    }
  }
})
